package com.liuhan.house.dao;

import com.liuhan.house.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int deleteByEmail(String email);

    int update(User updateUser);

    int verifyUser(@Param("userEmail") String userEmail, @Param("password") String password);

    User selectByUserNameAndPassword(@Param("userEmail") String userEmail, @Param("password") String password);

    User getUserByEmail(String email);

    int updateUserInfo(@Param("username") String username, @Param("phone") String phone, @Param("aboutme") String aboutme, @Param("email") String email);

    User getUserByEmailAndPassword(@Param("userEmail") String userEmail, @Param("password") String password);

    int editorPassword(@Param("newPassword") String newPassword, @Param("email") String email);

    List<User> getAgencyList();
}